uri 1953 solution in cpp
by ujjal roy
#include<bits/stdc++.h>
using namespace std;
main()
{
int n,a,eh,ep,in;
string s;
while(cin>>n)
{
eh=0;
ep=0;
in=0;
while(n--)
{
cin>>a>>s;
if(s=="EPR") ep++;
else if(s=="EHD") eh++;
else in++;
}
cout<<"EPR: "<<ep<<endl;
cout<<"EHD: "<<eh<<endl;
cout<<"INTRUSOS: "<<in<<endl;
}
return 0;
}
0 Comments